/*
 * Random.h
 *
 *  Created on: 14/09/2013
 *      Author: gonzalo
 */

#ifndef RANDOM_H_
#define RANDOM_H_

#include <cstdlib>
#include <unistd.h>
#include <cmath>
#include <sys/time.h>

class Random {
public:
	Random();

	/* Random integer */
	static int randomInt(int desde = 0, int hasta = 2147483647);

	/* Random sleep en milisegundos*/
	static void msleep(int durationMs, int startMs = 0);

	/* Sets the scale wich will divide the time of sleep */
	static void setScale(int scale);

	/* Random true or false */
	static bool coin();
	virtual ~Random();
private:
	static int scale;

};

#endif /* RANDOM_H_ */
